package com.etc.togo.service;

import org.hibernate.service.spi.ServiceException;
import org.springframework.web.multipart.MultipartFile;

import com.etc.togo.domain.Car;
import com.etc.togo.vo.ResultVO;

public interface ICarService extends IBaseService<Car>{
	
	public ResultVO search(String keyword,int pageNum,int pageSize) throws ServiceException;
	
	public ResultVO pageCar(int pageNum,int pageSize) throws ServiceException;
	
	public ResultVO listByCategory(String category,int pageNum,int pageSize) throws ServiceException;
	
	public ResultVO add(MultipartFile photo,Car car,Long user_id, String username) throws ServiceException;
	
	public ResultVO delete(Long id) throws ServiceException;
	
	public ResultVO update(MultipartFile photo,Car car) throws ServiceException;
	
	public ResultVO getAudit(int pageNum,int pageSize) throws ServiceException;

	public ResultVO auditCar(Long id, String status) throws ServiceException;

	public ResultVO changeToSold(Long car_id,Long purchaser_id);

	public ResultVO getSold(int pageNum, int pageSize);

	public ResultVO getCarByModel(Long model_id,int pageNum,int pageSize);

	public ResultVO getByUser(Long user_id,int pageNum,int pageSize);

}
